import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import _get from 'lodash.get';
import { defHttp } from '/@/utils/http/axios';

import {
	getCompanyList,
} from './index.api'
//表单数据
export const formSchema : FormSchema[] = [

];

export const usersColumns : BasicColumn[] = [
	{
		title: '姓名',
		align: "center",
		dataIndex: 'realname'
	}, {
		title: '身份证',
		align: "center",
		dataIndex: 'idnum'
	}, {
		title: '电话',
		align: "center",
		dataIndex: 'phone'
	}, {
		title: '性别',
		align: "center",
		dataIndex: 'sex',
		customRender: ({ text }) => {
			if (text == 'Male') return '男'
			if (text == 'FeMale') return '女'
			if (text == 'Secret') return '保密'
		}
	},
	{
		title: '操作',
		dataIndex: 'operation',
		align: 'center',
		width:200,
		slots: { customRender: 'action' },
	},
]

export const pdtsColumns = [
	{
		title: '产品',
		align: "center",
		dataIndex: 'pdtTitle'
	}, {
		title: '数量',
		align: "center",
		dataIndex: 'extinfor',
		customRender: ({ text }) => {
			console.log(text)
			let o = JSON.parse(text)
			return o.num 
		}
	}, {
		title: '金额',
		align: "center",
		dataIndex: 'originprice'
	},
	{
		title: '金额',
		align: "center",
		dataIndex: 'originprice'
	},
	{
		title: '操作',
		width:200,
		dataIndex: 'operation',
		align: 'center',
		slots: { customRender: 'action' },
	},
]
/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData) : FormSchema[] {
	// 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
	return formSchema;
}